
function reDispatcher(element) {
    let relativePath = $(element).data('relative_path')
    if (!relativePath.endsWith('/')) { // file
        window.location.href = 'resource?download=true&relativePath=' + relativePath;
    } else { // folder
        $('#resourceListContent').load('/resource', {
            relativePath: relativePath
        });
    }

}